Hoffman2 Happy Hour
🎉 Welcome to the Hoffman2 Happy Hours
📧 cpeterson@oarc.ucla.edu
This presentation can be found on our github page
https://github.com/ucla-oarc-hpc/H2HH_rstudio
The html slides can be found at
https://ucla-oarc-hpc.github.io/H2HH_rstudio
More information and scripts on using RStudio on Hoffman2
RStudio is a great IDE for R and visualize files.
But why do you want to use RStudio on Hoffman2 when you can use your own computer???
RStudio on Hoffman2 provides access:
There are two main (free) RStudio formats that researchers can use
Standalone desktop application
Installed locally on your machine
RStudio Desktop can be inefficient on Hoffman2
RStudio Server is the best way to use RStudio on Hoffman2
RStudio Server on Hoffman2 created from Docker
apptainer run \
-B $SCRATCH/rstudiotmp/var/lib:/var/lib/rstudio-server \
-B $SCRATCH/rstudiotmp/var/run:/var/run/rstudio-server \
-B $SCRATCH/rstudiotmp/tmp:/tmp \
$H2_CONTAINER_LOC/h2-rstudio_4.1.0.sifapptainer run
-B $SCRATCH/rstudiotmp/[dir]:[/dir]
$H2_CONTAINER_LOC/h2-rstudio_4.1.0.sif
ssh -N -L ... info to be ranNote
KEEP THIS TERMINAL OPEN UNTIL YOU JOB IS DONE
Open another terminal on your local computer
Run the port forward command
8787 if needednXXX is the compute node nameusername is your Hoffman2 username8787 if neededh2_rstudio.sh
h2-studio.sh Information
Look at our Github page
Tested Platforms
✅ Mac’s terminal app
✅ Window’s WSL2
✅ MoboXterm
❌ GitBash
This RStudio Script is currently on our GitHub page
$H2_CONTAINER_LOCh2-rstudio_X.Y.Z.sif
X.Y.Z is the R version~/R/APPTAINER/h2-rstudio_4.1.0 (for h2_rstudio-4.1.0.sif)R Package Installs
apptainer exec#!/bin/bash
#$ -cwd
#$ -o rstudio_batch.out.$JOB_ID
#$ -j y
#$ -l h_rt=3:00:00,h_data=10G
#$ -pe shared 1
# Load Apptainer module
. /u/local/Modules/default/init/modules.sh
module load apptainer
# Run R with a R script, named myRtest.R
apptainer exec $H2_CONTAINER_LOC/h2-rstudio_4.1.0.sif R CMD BATCH myRtest.Rh2_rstudio.sh script for easy setup